/*
 * Copyright (C) 2010, Funcom AS, All Rights Reserved
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  @authors
 *  Svein Gunnar Larsen <sveingunnarlarsen@gmail.com>
 *  Erik Thune Lund <culex.eriklund@gmail.com>
 *  Michel Krohn-Dale <kronicz@gmail.com>
 */

package com.funcom.peeler.utils;

import javax.swing.*;

public class SwingMessages {

    public final static int WRONG_STYLE  = 0;
    public final static int ERROR_DELETE = 1;
    public final static int CLEAR_ROOT = 2;

    /**
     * Displays Error messages
     * @param message Error message to display
     */
    public static void textError(int message) {

        switch (message) {
            case WRONG_STYLE: {
                JOptionPane.showMessageDialog(null, "Style exists, please rename!", "Error", JOptionPane.ERROR_MESSAGE);
                break;
            }
            case ERROR_DELETE: {
                JOptionPane.showMessageDialog(null, "Component relying on style, can't delete!", "Error", JOptionPane.ERROR_MESSAGE);
                break;
            }
            case CLEAR_ROOT: {
                JOptionPane.showMessageDialog(null, "Can't clear the root style", "Error", JOptionPane.ERROR_MESSAGE);
                break;
            }
        }
    }
}
